package kr.co.mcshop.option;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class OptionService {

	@Autowired
	private SqlSession sqlsession;
	
	public List getAllOption(Map map) {
		OptionMapper mapper = sqlsession.getMapper(OptionMapper.class);
		return mapper.getAllOption(map);
	}
	
	public int InsertOption(Map map){
		OptionMapper mapper = sqlsession.getMapper(OptionMapper.class);
		return mapper.insertOption(map);
	}
	
	public int UpdateOption(Map map){
		OptionMapper mapper = sqlsession.getMapper(OptionMapper.class);
		return mapper.updateOption(map);
	}
	
	public int DeleteOption(Map map){
		OptionMapper mapper = sqlsession.getMapper(OptionMapper.class);
		return mapper.deleteOption(map);
	}
}
